import request from '@/utils/request'

/**
 * 获取所有菜单和权限码
 */
export const list=(param)=>{
  return request({
        url: '/QH/user/getAllMenuList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}

/**
 * 删除菜单和权限码
 */
export const del=(param)=>{
  return request({
        url: '/QH/user/delDep?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 新增菜单和权限码
 */
export const add=(param)=>{
  return request({
        url: '/QH/user/addMenu?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}


/**
 * 用户列表
 */
export const UserList=(param)=>{
  return request({
        url: '/QH/user/getUserList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}

/**
 * 用户权限
 */
export const Authority=(param)=>{
  return request({
        url: '/QH/user/getUserMenuAuthority?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 用户修改权限
 */
export const addAuthority=(param)=>{
  return request({
        url: '/QH/user/addUserMenuAuthority?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}


/**
 * 新增用户
 */
export const addUser=(param)=>{
  return request({
        url: '/QH/user/addUser?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 修改用户
 */
export const editUser=(param)=>{
  return request({
        url: '/QH/user/editUser?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}

/**
 * 删除用户
 */
export const deleteUser=(param)=>{
  return request({
        url: '/QH/user/deleteUser?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
